<template>
  <div :class="$style.progressWrap">
    <progress-box :progressLine="progressLine"></progress-box>
    <div class="flexWrap cBasic2 f36 mt35">
      <span class="flexItemC">已投{{progressLine}}%</span>
      <span class="flexItemC">剩余可投{{remainValue}}元</span>
    </div>
  </div>
</template>

<script>
  import progressBox from '@/pagesModule/progress'

  export default {
    name: 'investDetailXtbProgress',
    components: {
      progressBox
    },
    props: {
      bidInvestedVaule: {
        type: Number,
        default: 0
      },
      bidTotalVaule: {
        type: Number,
        default: 0
      }
    },
    computed: {
      progressLine () {
        return (this.bidInvestedVaule / this.bidTotalVaule) * 100
      },
      remainValue () {
        return this.bidTotalVaule - this.bidInvestedVaule
      }
    }
  }
</script>

<style lang="scss" module>
  .progressWrap {
    padding: 50px;
    margin-bottom: 30px;
  }
</style>
